Oct Function
Returns as a String, the octal version of the number passed.
Syntax
result = Oct( value )
Parameters | ||
value |
The number to be converted to octal. |
Notes
If the value is not a whole number, the decimal value will be truncated.
VB Compatibility Note: VB rounds the value to the nearest whole number so the Oct function will probably be changed in a future release to do this as well.
You can specify binary, hex, or octal numbers by preceding the number with the & symbol and the letter that indicates the number base. The letter b indicates binary, h indicates hex, and o indicates octal.
Examples
Here are examples of various numbers converted to octal:
Dim OctVersion As String
OctVersion=Oct (5) //returns "5"
OctVersion=Oct(75) //returns "113"
OctVersion=Oct(256) //returns "400"
OctVersion=Oct (5) //returns "5"
OctVersion=Oct(75) //returns "113"
OctVersion=Oct(256) //returns "400"
See Also